<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    if (path.length() > 0) path = path.substring(0, path.length() - 1);
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <jsp:include page="incTopScript.jsp" flush="false"/>
    <title>第七组点卡商城</title>
</head>
<body>
<!--     拟态框 -->
<div class="modal fade" id="userInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <h4 class="modal-title" id="userInfoLabel">详细信息</h4>
            </div>
            <div class="modal-body">
                <iframe id="user" width="100%" height="400px"></iframe>
            </div>
            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn" style="background:#4a9bd6;color: #fff;">关闭
                </button>
            </div>
        </div>
    </div>
</div>
<!--     拟态框 -->
<nav style="
        box-shadow: 0 0 10px #508fbb;
    position: fixed;
    z-index: 1030;
    right: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 8px 8px;
">
    <div class="container">

        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false"><span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span></button>
            <a class="navbar-brand" href="<%=path %>/index.action">点卡商城</a></div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li class="active"><a href="<%=path %>/good/goodList.action">点卡选购 <span class="sr-only">(current)</span></a>
                </li>
                <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                                        aria-expanded="false" aria-haspopup="true">帮助中心<span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="<%=path %>/noticeAll.action" target="_blank">网站公告</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="/view/help/reg.jsp">如何注册</a></li>
                        <li><a href="/view/help/buy.jsp">如何购买点卡</a></li>
                        <li><a href="/view/help/use.jsp">点卡的使用</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="/view/help/about.jsp">关于网站</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a target="_blank" href="<%=path %>/admin/login.jsp">管理员登录</a></li>
                    </ul>
                </li>
            </ul>
            <form class="navbar-form navbar-right" role="search" action="<%=path %>/good/goodSearch.action" name="from1"
                  method="post">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="点卡名称" name="goodName" size="15">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
            <ul class="nav navbar-nav navbar-right hidden-sm">
                <s:if test="#session.user==null">
                    <li><a href="<%=path %>/view/user/userReg.jsp">注册</a></li>
                    <li><a href="<%=path %>/view/user/userLogin.jsp">登陆</a></li>
                </s:if>
                <s:else>
                    <li><a href="#" onClick="myInfo()"><s:property value="#session.user.userName"/></a></li>
                    <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                                            aria-expanded="false" aria-haspopup="true">我的 <span
                            class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="#" onClick="myCart()">购物车</a></li>
                            <li><a href="#" onClick="myOrder()">订单</a></li>
                            <li><a href="#" onClick="myInfoEdit()">账户修改</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="<%=path %>/user/userLogout.action">退出登陆</a></li>
                        </ul>
                    </li>
                </s:else>
            </ul>
        </div>
        <!-- navbar-collapse -->
    </div>
    <!-- container-fluid -->
</nav>
<div class="container">
    <div class="navbar-header" style="margin-bottom: 10px;">
        <a class="navbar-brand"> </a>
    </div>
</div>
